home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 1634 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  805 b 

  1. Path: krel.iea.com!usenet
  2. From: 73700.732@compuserve.com
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Problem with file read/write
  5. Date: Thu, 11 Jan 1996 04:29:57 -0800
  6. Organization: CompuTech
  7. Message-ID: <30F502C5.2F10@compuserve.com>
  8. References: <1996Jan10.080808@msuvx2.memphis.edu>
  9. NNTP-Posting-Host: e13.iea.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0b5 (WinNT; I)
  14. CC: tangh@cc.memphis.edu
  15.  
  16. your buffer s1 is too small.  you are likely having memory
  17. corruption problems.
  18.  
  19. your read reads 80 bytes into an 80 buffer then strcats a 45
  20. byte buffer to the end of it.  if those are mostly full, you
  21. have a problem.
  22.  
  23. simple solution is to make s1 have at least 129 bytes. the 
  24. 80, 45 and 3 tabs plus room for a NULL
  25.  
  26. good luck,
  27. scott...
  28.